version: "3.5"

services:
  redis:
    image: redis
    restart: always
    ports:
      - 6379:6379

  db:
    image: postgres
    restart: always
    command: ["postgres", "-c", "log_statement=all"]
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=postgres
    ports:
      - 5432:5432
    volumes:
      - database_data:/var/lib/postgresql/data

volumes:
  database_data:
    driver: local
